#pragma once

#include "ObservationLikelihoodEvaluator.h"

#include <mrpt/utils/CSerializable.h>
#include <mrpt/slam/CObservation.h>
#include <mrpt/poses/CPose3D.h>

using namespace mrpt::slam;

DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE( CObservationImageLandmarks , CObservation )

class CObservationImageLandmarks : public CObservation {

	// This must be added to any CSerializable derived class:
	DEFINE_SERIALIZABLE( CObservationImageLandmarks )

public:
	CObservationImageLandmarks(void);

	struct TMeasurement {
		int   id;
		float x;   //coordinates in 1D image
	};

	float  likelihoodWith( const CObservation *anotherObs, const CPosePDF *anotherObsPose = NULL ) const ;

	void getSensorPose( CPose3D &out_sensorPose ) const { out_sensorPose = sensorLocationOnRobot; }

	void setSensorPose( const CPose3D &newSensorPose ) { sensorLocationOnRobot = newSensorPose; }

public:

	std::deque<TMeasurement> sensedData;

	CPose3D		sensorLocationOnRobot;

	CObservationLikelihoodEvaluator* pLikelihoodEvaluator;
};

